package AndroidProjectFile

/**
 * Created by IntelliJ IDEA.
 * User: romaincherix
 * Date: 10.04.11
 * Time: 12:08
 * To change this template use File | Settings | File Templates.
 */

import FilesGenerator.UserConfig

// this class is able to return parameters to write in ant file

object AntSetup {

  // the parameters is a list of dependencies path
  def getBuildProperties(): String = {
    "# This file is used to override default values used by the Ant build system.\n# \n# This" +
    "file must be checked in Version Control Systems, as it is\n# integral to the build system of your project.\n\n " +
    "# This file is only used by the Ant script.\n\n# You can use this to override default values such as\n#  "+
    "'source.dir' for the location of your java source folder and\n#  'out.dir' for the location of your output folder.\n\n"+
    "# You can also use it define how the release builds are signed by declaring\n# the following properties:\n#  "+
    "'key.store' for the location of your keystore and\n#  'key.alias' for the name of the key to use.\n# "+
    "The password will be asked during the build when you use the 'release' target.\n\n"+
    "# By adding the following two lines to the imported Ant script file\n# platforms/android-<level>/ant/ant_rules_r2.xml :\n#"+
    "  <property name=\" javac.args \" value=\" - nowarn \" />\n#  <compilerarg line=\" $ {javac.args} \"/>  <!-- 'compile' target -->\n"+
    "# you can specify additional compiler arguments (e.g. to generate detailed\n# warning messages): \n#  javac.args=-deprecation -Xlint\n\n" +
    "sdk.dir=" + UserConfig.androidSdkPath +  "\n\n" +
    "scala.dir=" + UserConfig.scalaPath +  "\n\n" +
    "scalac.addParams=-deprecation" +  "\n\n" +
    "proguard.dir=" + UserConfig.proguardPath
  }

  def getDefaultProperties(): String = {
    "# This file is automatically generated by Android Tools.\n# Do not modify this file -- YOUR CHANGES WILL BE ERASED!\n# \n"+
    "# This file must be checked in Version Control Systems.\n# \n# To customize properties used by the Ant build system use,\n# "+"" +
    "\" build.properties \", and override values to adapt the script to your\n# project structure.\n\n"+
    "# Indicates whether an apk should be generated for each density.\n\n"
    "split.density=false" + "\n" +
    "# Project target.\n" +
    "target=android-" + ProjectParameters.minVersion
  }


  def getLocalProperties(): String = {
    "sdk.dir=" + UserConfig.androidSdkPath + "\n" +
    "scala.dir=" + UserConfig.scalaPath + "\n\n" +
    "# Android key \n" +
    "key.store=" + MarketKey.path + "\n" +
    "key.alias=" + MarketKey.alias + "\n" +
    "key.store.password=" + MarketKey.storePass + "\n" +
    "key.alias.password=" + MarketKey.aliasPass
  }

}